from django.db import models


# Create your models here.
class Player(models.Model):
    steamid = models.BigIntegerField(default=0)
    score = models.IntegerField(default=1000)
    win = models.IntegerField(default=0)
    lose = models.IntegerField(default=0)
    abbadon = models.IntegerField(default=0)
    def __str__(self):
        return str(self.steamid)

class Game(models.Model):
    class GameState(models.TextChoices):
        INIT = "IN", "Init"
        PROCESSED = "PR", "Processed"
        ERROR = "ER", "Error"

    gameid = models.BigIntegerField(default=0)
    createdate = models.DateTimeField("record create date")
    state = models.CharField(max_length = 2, choices = GameState.choices, default = GameState.INIT)

    def __str__(self):
        return str(self.gameid) + self.state
